import {http} from "@/utils/index.jsx";
function getOneEquipmentByIdAPI(id){
    return http({
        url:`/equipment/${id}`,
        method:'GET'
    })
}

function getAllEquipmentByPageAPI(current,pageSize){
    return http({
        url:'/equipment/getAllByPage',
        method:'GET',
        params:{
            current:current,
            pageSize:pageSize
        }
    })
}

function saveOneEquipmentAPI(formData){
    return http({
        url:'/equipment/saveOne',
        method:'POST',
        headers:{
            'content-type': 'multipart/form-data'
        },
        data:formData
    })
}



export {getOneEquipmentByIdAPI,
    getAllEquipmentByPageAPI,saveOneEquipmentAPI
}